home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / lib / gcc-lib / ppc-amigaos / 2.95.1 / sys-include / powerup / ppcpragmas / diskfont_pragmas.h < prev    next >
C/C++ Source or Header  |  2000-03-13  |  4KB  |  123 lines

  1. /* Automatically generated header! Do not edit! */
  2.  
  3. #ifndef _PPCPRAGMA_DISKFONT_H
  4. #define _PPCPRAGMA_DISKFONT_H
  5. #ifdef __GNUC__
  6. #ifndef _PPCINLINE__DISKFONT_H
  7. #include <powerup/ppcinline/diskfont.h>
  8. #endif
  9. #else
  10.  
  11. #ifndef POWERUP_PPCLIB_INTERFACE_H
  12. #include <powerup/ppclib/interface.h>
  13. #endif
  14.  
  15. #ifndef POWERUP_GCCLIB_PROTOS_H
  16. #include <powerup/gcclib/powerup_protos.h>
  17. #endif
  18.  
  19. #ifndef NO_PPCINLINE_STDARG
  20. #define NO_PPCINLINE_STDARG
  21. #endif/* SAS C PPC inlines */
  22.  
  23. #ifndef DISKFONT_BASE_NAME
  24. #define DISKFONT_BASE_NAME DiskfontBase
  25. #endif /* !DISKFONT_BASE_NAME */
  26.  
  27. #define    AvailFonts(buffer, bufBytes, flags)    _AvailFonts(DISKFONT_BASE_NAME, buffer, bufBytes, flags)
  28.  
  29. static __inline LONG
  30. _AvailFonts(void *DiskfontBase, STRPTR buffer, long bufBytes, long flags)
  31. {
  32. struct Caos    MyCaos;
  33.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  34. //    MyCaos.M68kStart    =    NULL;
  35. //    MyCaos.M68kSize        =    0;
  36.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  37. //    MyCaos.PPCStart        =    NULL;
  38. //    MyCaos.PPCSize        =    0;
  39.     MyCaos.a0        =(ULONG) buffer;
  40.     MyCaos.d0        =(ULONG) bufBytes;
  41.     MyCaos.d1        =(ULONG) flags;
  42.     MyCaos.caos_Un.Offset    =    (-36);
  43.     MyCaos.a6        =(ULONG) DiskfontBase;    
  44.     return((LONG)PPCCallOS(&MyCaos));
  45. }
  46.  
  47. #define    DisposeFontContents(fontContentsHeader)    _DisposeFontContents(DISKFONT_BASE_NAME, fontContentsHeader)
  48.  
  49. static __inline void
  50. _DisposeFontContents(void *DiskfontBase, struct FontContentsHeader *fontContentsHeader)
  51. {
  52. struct Caos    MyCaos;
  53.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  54. //    MyCaos.M68kStart    =    NULL;
  55. //    MyCaos.M68kSize        =    0;
  56.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  57. //    MyCaos.PPCStart        =    NULL;
  58. //    MyCaos.PPCSize        =    0;
  59.     MyCaos.a1        =(ULONG) fontContentsHeader;
  60.     MyCaos.caos_Un.Offset    =    (-48);
  61.     MyCaos.a6        =(ULONG) DiskfontBase;    
  62.     PPCCallOS(&MyCaos);
  63. }
  64.  
  65. #define    NewFontContents(fontsLock, fontName)    _NewFontContents(DISKFONT_BASE_NAME, fontsLock, fontName)
  66.  
  67. static __inline struct FontContentsHeader *
  68. _NewFontContents(void *DiskfontBase, BPTR fontsLock, STRPTR fontName)
  69. {
  70. struct Caos    MyCaos;
  71.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  72. //    MyCaos.M68kStart    =    NULL;
  73. //    MyCaos.M68kSize        =    0;
  74.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  75. //    MyCaos.PPCStart        =    NULL;
  76. //    MyCaos.PPCSize        =    0;
  77.     MyCaos.a0        =(ULONG) fontsLock;
  78.     MyCaos.a1        =(ULONG) fontName;
  79.     MyCaos.caos_Un.Offset    =    (-42);
  80.     MyCaos.a6        =(ULONG) DiskfontBase;    
  81.     return((struct FontContentsHeader *)PPCCallOS(&MyCaos));
  82. }
  83.  
  84. #define    NewScaledDiskFont(sourceFont, destTextAttr)    _NewScaledDiskFont(DISKFONT_BASE_NAME, sourceFont, destTextAttr)
  85.  
  86. static __inline struct DiskFont *
  87. _NewScaledDiskFont(void *DiskfontBase, struct TextFont *sourceFont, struct TextAttr *destTextAttr)
  88. {
  89. struct Caos    MyCaos;
  90.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  91. //    MyCaos.M68kStart    =    NULL;
  92. //    MyCaos.M68kSize        =    0;
  93.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  94. //    MyCaos.PPCStart        =    NULL;
  95. //    MyCaos.PPCSize        =    0;
  96.     MyCaos.a0        =(ULONG) sourceFont;
  97.     MyCaos.a1        =(ULONG) destTextAttr;
  98.     MyCaos.caos_Un.Offset    =    (-54);
  99.     MyCaos.a6        =(ULONG) DiskfontBase;    
  100.     return((struct DiskFont *)PPCCallOS(&MyCaos));
  101. }
  102.  
  103. #define    OpenDiskFont(textAttr)    _OpenDiskFont(DISKFONT_BASE_NAME, textAttr)
  104.  
  105. static __inline struct TextFont *
  106. _OpenDiskFont(void *DiskfontBase, struct TextAttr *textAttr)
  107. {
  108. struct Caos    MyCaos;
  109.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  110. //    MyCaos.M68kStart    =    NULL;
  111. //    MyCaos.M68kSize        =    0;
  112.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  113. //    MyCaos.PPCStart        =    NULL;
  114. //    MyCaos.PPCSize        =    0;
  115.     MyCaos.a0        =(ULONG) textAttr;
  116.     MyCaos.caos_Un.Offset    =    (-30);
  117.     MyCaos.a6        =(ULONG) DiskfontBase;    
  118.     return((struct TextFont *)PPCCallOS(&MyCaos));
  119. }
  120.  
  121. #endif /* SASC Pragmas */
  122. #endif /* !_PPCPRAGMA_DISKFONT_H */
  123.